package com.yike.product.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.api.Update;
import com.yike.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品表
 *
 * @author yike
 * @since 2024-07-17
 */
@Data
@Accessors(chain = true)
public class GoodsVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("店铺ID")
    private Long shopId;

    @ApiModelProperty("商品条码")
    private String barcode;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("商品图片")
    private String image;

    @ApiModelProperty("商品售价")
    private BigDecimal sellPrice;

    @ApiModelProperty("商品进价")
    private BigDecimal buyPrice;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("商品规格")
    private String specification;

    @ApiModelProperty("生产厂家")
    private String manufacturerName;

    @ApiModelProperty("平台上架  1：上架 0：下架")
    private Boolean shelfFlag;

    @ApiModelProperty("品牌")
    private String brand;

    @ApiModelProperty(value = "生产时间", example = "2020-01-01")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date manufacturerTime;

    @ApiModelProperty(value = "到期时间")
    private String expireTime;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("创建人")
    private Long createBy;

    @ApiModelProperty("创建人名称")
    private String createByName;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("修改人")
    private Long updateBy;

    @ApiModelProperty("修改人名称")
    private String updateByName;

}
